package cn.yapin.gzh.service.impl;

import cn.yapin.gzh.dao.UserMapper;
import cn.yapin.gzh.entity.UserInfo;
import cn.yapin.gzh.service.IUserInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class UserInfoImpl implements IUserInfo {
    @Autowired
    private UserMapper userMapper;

    @Override
    public UserInfo loadUser(UserInfo userInfo) {
        try {
            return userMapper.loadUser(userInfo);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public UserInfo loadUserById(String userId) {
        try {
            return userMapper.loadUserById(userId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public List<UserInfo> loadAreaArray() {
        try {
            return userMapper.loadAreaArray();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public List<UserInfo> loadUserAll() {
        try {
            return userMapper.loadUserAll();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
